<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
<html>
<head>
    <title>推送app管理</title>
    <meta name="decorator" content="default"/>
    <script type="text/javascript">
        $(document).ready(function () {

        });
        function page(n, s) {
            $("#pageNo").val(n);
            $("#pageSize").val(s);
            $("#searchForm").submit();
            return false;
        }
    </script>
</head>
<body>
<ul class="nav nav-tabs">
    <li class="active"><a href="${ctx}/notify/notiApp/">app列表</a></li>
    <shiro:hasPermission name="notify:notiApp:edit">
        <li><a href="${ctx}/notify/notiApp/form">app添加</a></li>
    </shiro:hasPermission>
</ul>
<form:form id="searchForm" modelAttribute="notiApp" action="${ctx}/notify/notiApp/" method="post"
           class="breadcrumb form-search">
    <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
    <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
    <ul class="ul-form">
            <%--<li><label>系统用户编号：</label>
                <form:input path="sysUserId" htmlEscape="false" maxlength="64" class="input-medium"/>
            </li>--%>
        <li><label>app名称：</label>
            <form:input path="appName" htmlEscape="false" maxlength="100" class="input-medium"/>
        </li>
        <li><label>app钥匙：</label>
            <form:input path="appKey" htmlEscape="false" maxlength="128" class="input-medium"/>
        </li>
        <li><label>app密码：</label>
            <form:input path="appSecret" htmlEscape="false" maxlength="128" class="input-medium"/>
        </li>
        <li><label>新增用户：</label>
            <form:input path="addConsumerNumber" htmlEscape="false" maxlength="30" class="input-medium"/>
        </li>
        <li><label>在线用户：</label>
            <form:input path="onlineConsumerNumber" htmlEscape="false" maxlength="30" class="input-medium"/>
        </li>
        <li><label>总用户：</label>
            <form:input path="totalConsumerNumber" htmlEscape="false" maxlength="30" class="input-medium"/>
        </li>
        <li><label>添加时间：</label>
            <input name="crateDate" type="text" maxlength="20" class="input-medium Wdate"
                   value="<fmt:formatDate value="${notiApp.crateDate}" pattern="yyyy-MM-dd HH:mm:ss"/>"
                   onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/>
        </li>
        <li><label>更新时间：</label>
            <input name="updateDate" type="text" maxlength="20" class="input-medium Wdate"
                   value="<fmt:formatDate value="${notiApp.updateDate}" pattern="yyyy-MM-dd HH:mm:ss"/>"
                   onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/>
        </li>
        <li class="btns"><input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/></li>
        <li class="clearfix"></li>
    </ul>
</form:form>
<sys:message content="${message}"/>
<table id="contentTable" class="table table-striped table-bordered table-condensed">
    <thead>
    <tr>
        <th>编号</th>
        <th>用户编号</th>
        <th>App名称</th>
        <th>App图标</th>
        <th>AppKey</th>
        <th>AppSecret</th>
        <th>新增用户数</th>
        <th>在线用户数</th>
        <th>总用户数</th>
        <th>创建者</th>
        <th>创建时间</th>
        <th>更新者</th>
        <th>更新时间</th>
        <th>删除标记</th>
        <th>备注</th>
        <shiro:hasPermission name="notify:notiApp:edit">
            <th>操作</th>
        </shiro:hasPermission>
    </tr>
    </thead>
    <tbody>
    <c:forEach items="${page.list}" var="notiApp">
        <tr>
            <td><a href="${ctx}/notify/notiApp/form?id=${notiApp.id}">
                    ${notiApp.id}
            </a></td>
            <td>
                    ${notiApp.sysUserId}
            </td>
            <td>
                    ${notiApp.appName}
            </td>
            <td>
                <img id="image" src="${notiApp.appIcon}">
                    <%--${notiApp.appIcon}--%>
            </td>
            <td>
                    ${notiApp.appKey}
            </td>
            <td>
                    ${notiApp.appSecret}
            </td>
            <td>
                    ${notiApp.addConsumerNumber}
            </td>
            <td>
                    ${notiApp.onlineConsumerNumber}
            </td>
            <td>
                    ${notiApp.totalConsumerNumber}
            </td>
            <td>
                    ${notiApp.createBy.id}
            </td>
            <td>
                <fmt:formatDate value="${notiApp.crateDate}" pattern="yyyy-MM-dd HH:mm:ss"/>
            </td>
            <td>
                    ${notiApp.updateBy.id}
            </td>
            <td>
                <fmt:formatDate value="${notiApp.updateDate}" pattern="yyyy-MM-dd HH:mm:ss"/>
            </td>
            <td>
                    ${fns:getDictLabel(notiApp.delFlag, 'del_flag', '')}
            </td>
            <td>
                    ${notiApp.remarks}
            </td>
            <shiro:hasPermission name="notify:notiApp:edit">
                <td>
                    <a href="${ctx}/notify/notiApp/form?id=${notiApp.id}">修改</a>
                    <a href="${ctx}/notify/notiApp/delete?id=${notiApp.id}"
                       onclick="return confirmx('确认要删除该推送app管理吗？', this.href)">删除</a>
                </td>
            </shiro:hasPermission>
        </tr>
    </c:forEach>
    </tbody>
</table>
<div class="pagination">${page}</div>
</body>
</html>